package com.fh.modules.oms;

import com.fh.modules.oms.entity.OmsOrderWechat;
import com.fh.modules.ums.entity.UmsMemberReceiveAddress;

/**
 * @Description:
 * @author： qiujunda
 * @date： 2019/10/13 23:50
 */
public class OrderUtils {

    /**
     * 初始化订单的收货地址信息
     *
     * @param omsOrderWechat
     * @param umsMemberReceiveAddress
     */
    public static void initOrderInfo(OmsOrderWechat omsOrderWechat, UmsMemberReceiveAddress umsMemberReceiveAddress) {
        omsOrderWechat.setDelFlag(0);
        omsOrderWechat.setStatus(OrderStatus.NOT_PAY.getValue());
        omsOrderWechat.setReceiverName(umsMemberReceiveAddress.getName());
        omsOrderWechat.setReceiverCity(umsMemberReceiveAddress.getCity());
        omsOrderWechat.setReceiverProvince(umsMemberReceiveAddress.getProvince());
        omsOrderWechat.setReceiverRegion(umsMemberReceiveAddress.getRegion());
        omsOrderWechat.setReceiverDetailAddress(umsMemberReceiveAddress.getDetailAddress());
        omsOrderWechat.setReceiverPhone(umsMemberReceiveAddress.getMobile());
    }
}
